Title: SQL BT (By-BKK) / 15 Delete
Tags: Obsidian_to_Anki

Q: How do you remove specific rows from a SQL table?
A: DELETE FROM table WHERE condition

Q: Why should you use SELECT before deleting rows in SQL?
A: Test your DELETE WHERE clause with SELECT first

Q: What happens if the WHERE clause is missing in a DELETE statement?
A: DELETE without a WHERE clause erases all rows

Q: Why is caution important when executing the DELETE command in SQL?
A: Deleting data from a table is usually irreversible

Q: True/False: DELETE without WHERE will remove all rows in the table
A: True

Q: What happens if you leave out the WHERE clause in a DELETE statement?
A: All rows are deleted

Q: Before deleting rows, what should you do to ensure you remove the correct data?
A: Test the constraint with a SELECT query

Q: Why is it risky to run DELETE statements without backups?
A: Data removal is often irreversible

Q: How do you delete all movies released before 2005 in SQL?
A: DELETE FROM movies WHERE year < 2005;

Q: What SQL command removes all movies directed by Andrew Stanton?
A: DELETE FROM movies WHERE director = 'Andrew Stanton';

Q: True/False: You can delete multiple rows with a single DELETE statement
A: True

Q: Why is double-checking your DELETE statement important?
A: To avoid accidental data loss

Q: What SQL statement is used to remove rows from a table?
A: DELETE

Q: How do you specify which rows to delete in SQL?
A: Use the WHERE clause with DELETE